package staticproxy;

/**
 * @author hht
 * @ClassName JdkProxy
 * @Description TODO
 * @Date 2019/5/28 8:41
 * @VERSION 1.0
 */
public class Proxy implements Subject{

    private Subject subject;

    public Proxy(Subject subject){
        this.subject = subject;
    }

    @Override
    public void request() {
        before();
        subject.request();
        after();
    }

    private void before(){
        System.out.println("代理前");
    }
    private void after(){
        System.out.println("代理后");
    }
}
